In [2]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
Using code to generate data to plot
In [15]:
def circle():
num_steps = 100
pos = np.zeros([num_steps + 1, 2])
for i in range(num_steps + 1):
angle = 2.*np.pi * i / num_steps
pos[i,0] = np.cos(angle)
pos[i,1] = np.sin(angle)
return pos
x = circle()
plt.axis('equal')
plt.xlim(-1.1, 1.1)
plt.ylim(-1.1, 1.1)
plt.plot(x[:, 0], x[:, 1])
Out[15]:
In [ ]: